<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>普通用户-图书管理系统</title>
    <link href="/layui/css/layui.css" rel="stylesheet"/>
</head>
<body class="layui-layout-body">

<div class="layui-layout layui-layout-admin">

    <div th:include="common/user_header :: header"></div>

    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
            <ul class="layui-nav layui-nav-tree">

                <li class="layui-nav-item ">
                    <a class="" href="javascript:;">借阅管理</a>
                    <dl class="layui-nav-child">
                        <dd><a href="/userBorrowBookRecord">&emsp;&emsp;借书记录</a></dd>
                        <dd><a href="/borrowingPage">&emsp;&emsp;借阅书籍</a></dd>
                    </dl>
                </li>

                <li class="layui-nav-item layui-nav-itemed">
                    <a class="" href="javascript:;">书籍管理</a>
                    <dl class="layui-nav-child">
                        <dd><a href="/userReturnBooksPage">&emsp;&emsp;归还书籍</a></dd>
                        <dd class="layui-this"><a href="/findBookPage">&emsp;&emsp;查询书籍</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item"><a href="/userMessagePage">个人信息</a></li>
            </ul>
        </div>
    </div>

    <div class="layui-body layui-container">

        <div class="layui-row">
            <div class="layui-col-md4"><!--左半部分-->

                <hr class="layui-bg-blue">
                <h1 style="text-align:left">查询书籍</h1>
                <hr class="layui-bg-blue">

                <form class="layui-form" action="/findBookByBookPartInfo" id="findBookByNameForm">

                    <div class="layui-form-item">
                        <input placeholder="请输入书名信息" class="layui-input" autofocus autocomplete="off" type="text"
                               name="bookPartInfo" lay-verify="required">
                    </div>

                    <input class="layui-btn" type="submit" lay-submit="" value="查询">
                </form>
            </div>


            <div class="layui-col-md7 layui-col-lg-offset1"><!--右半部分-->

                <hr class="layui-bg-blue">
                <h1 style="text-align: left">查询结果</h1>
                <hr class="layui-bg-blue">

                <table class="layui-table ">
                    <thead>
                    <tr>
                        <th>书籍编号</th>
                        <th>书名</th>
                        <th>作者</th>
                        <th>出版社</th>
                        <th>状态</th>
                    </tr>
                    </thead>

                    <tr th:each="book:${bookList}">
                        <td><label th:text="${book.getBookId()}"></label></td>
                        <td><label th:text="${book.getBookName()}"></label></td>
                        <td><label th:text="${book.getBookAuthor()}"></label></td>
                        <td><label th:text="${book.getBookPublish()}"></label></td>
                        <td><label th:text="${book.getIsExist()}"></label></td>
                    </tr>
                </table>
            </div>
        </div>


    </div>

    <div th:include="common/footer :: footer"></div>

</div>


<script src="/scripts/jquery.min.js"></script>
<script src="/layui/layui.js"></script>

<script>
    layui.use(['form', 'element'], function () {
        let form = layui.form;
        let element = layui.element;
    });
</script>

</body>
</html>
